import http from '../index'

// 分页获取月结用户
export const getMonthlyUsers = ({ ascended = null, current = null, size = null, sortFieldName = null, status = null, repaymentTime = null, phone = null, userName = null }) => {
    return http.get("monthly", { ascended, current, size, sortFieldName, status, repaymentTime, phone, userName })
}

// 根据sid获取月结用户
export const getMonthlyUserDetail = ({ sid }) => {
    return http.get("monthly/" + sid)
}

// 新增月结用户
export const addMonthlyUser = ({ userSid, repaymentTime, note = null, status = null }) => {
    return http.post("monthly", { userSid, repaymentTime, note, status })
}

// 修改月结用户
export const editMonthlyUser = ({ sid, repaymentTime, note = null }) => {
    return http.put("monthly/" + sid, { repaymentTime, note })
}


// 根据sid启用-停用月结用户
export const changeMonthlyUserStatus = ({ sid }) => {
    return http.put("monthly/" + sid + '/status')
}



